package com.atguigu.springcloud.client;

import com.atguigu.springcloud.entities.DeptDto;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@FeignClient(name = "MICROSERVICECLOUD-DEPT")
public interface ProviderClient2 {

    @RequestMapping(value = "/dept/get/{id}",method = RequestMethod.GET)
    DeptDto get(@PathVariable("id") long id);

    @RequestMapping(value = "/dept/list",method = RequestMethod.GET)
    List<DeptDto> list();

    @RequestMapping(value = "/dept/add",method = RequestMethod.POST)
    boolean add(DeptDto dept);
}
